<?php
/**
 * @version		2.0.1 | $Id: default.php 93 2009-08-28 10:56:02Z mwi.nor $
 */

// no direct access
defined('_JEXEC') or die('Restricted access'); ?>
<form action="index.php" method="post" name="adminForm">
<div id="editcell">
    <table class="adminlist">
    <thead>
        <tr>
            <th width="10" align="center">
    			<input type="checkbox" name="toggle" value="" onclick="checkAll(<?php echo count( $this->items ); ?>);" />
			</th>
			<th width="20" align="center">
                <?php echo JText::_( 'MD_PENALTY_ID' ); ?>
            </th>
			<th width="20" align="center">
                <?php echo JText::_( 'MD_PENALTY_SEASON' ); ?>
            </th>
			<th width="20" align="center">
                <?php echo JText::_( 'MD_PENALTY_EVENT' ); ?>
            </th>
			<th width="20" align="center">
                <?php echo JText::_( 'MD_PENALTY_TEAM' ); ?>
            </th>
			<th width="20" align="center">
                <?php echo JText::_( 'MD_PENALTY_PLAYER' ); ?>
            </th>
			<th width="20" align="center">
                <?php echo JText::_( 'MD_PENALTY_POINTS' ); ?>
            </th>
			<th width="20" align="center">
                <?php echo JText::_( 'MD_PENALTY_REMARKS' ); ?>
            </th>
        </tr>            
    </thead>
    <?php
    $imgpath = 'components/com_matchdart/images/';
    $k = 0;
    for ($i=0, $n=count( $this->items ); $i < $n; $i++)
    {
        $row =& $this->items[$i];
        $checked    = JHTML::_( 'grid.id', $i, $row->PenaltyID );
        $link = JRoute::_( 'index.php?option=com_matchdart&controller=Penalties&task=edit&cid[]='. $row->PenaltyID );
		?>
        <tr class="<?php echo "row$k"; ?>">
            <td align="center">
  				  <?php echo $checked; ?>
			</td>
            <td align="center">
            	<a href="<?php echo $link ?>"><?php echo $row->PenaltyID; ?></a>
            </td>
            <td align="center">
  				  <?php echo $row->PenaltySeasonName; ?>
			</td>
            <td align="center">
  				  <?php echo $row->PenaltyEventName; ?>
			</td>
            <td align="center">
  				  <?php echo $row->PenaltyTeamName; ?>
			</td>
            <td align="center">
  				  <?php echo $row->PenaltyPlayerName; ?>
			</td>
            <td align="center">
  				  <?php echo $row->PenaltyPoints; ?>
			</td>
            <td align="center">
  				  <?php echo $row->PenaltyRemarks; ?>
			</td>
        </tr>
        <?php
        $k = 1 - $k;
    }
    ?>
    <tfoot>
		<tr>
			<td colspan="17">
				<?php echo $this->pagination->getListFooter(); ?>
			</td>
		</tr>
	</tfoot>
    </table>
</div>

<input type="hidden" name="option" value="com_matchdart" />
<input type="hidden" name="task" value="" />
<input type="hidden" name="boxchecked" value="0" />
<input type="hidden" name="controller" value="penalties" />
<?php echo JHTML::_( 'form.token' ); ?>
</form>